package com.noble.glamour.ui.agora.act.bean;

import com.noble.library.base.bean.BaseData;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * 视频中投诉列表
 * Created by Su on 2017/7/27.
 */

public class RtcComplainReasons extends BaseData {
    private List<String> report_reasons;            // 视频中举报项

    @Override
    public void parseJson(String jsonStr) {
        JSONObject jsonObject = getJsonObject(getJsonObject(jsonStr).optString("res"));

        report_reasons = new ArrayList<>();
        JSONArray report_reasons_array = jsonObject.optJSONArray("reasons");
        for (int i = 0; report_reasons_array != null && i < report_reasons_array.length(); i++) {
            report_reasons.add(report_reasons_array.optString(i));
        }
    }

    public List<String> getReport_reasons() {
        return report_reasons;
    }
}
